package jsyf.oa.entity.yuce;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Created by y on 2018/3/19.
 */
@Entity
@Table(name = "t_rpt_friday_yuce_sub", schema = "oa", catalog = "")
public class YuceSubEntity extends BaseEntity implements Serializable {

    private String id;
    private String mainId;
    private String modelName;
    private String month;
    private BigDecimal number;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public BigDecimal getNumber() {
        return number;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("MODEL_NAME", getModelName());
        obj.put("MONTH", getMonth());
        obj.put("NUMBER", getNumber());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_rpt_friday_yuce_sub";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("MODEL_NAME", "modelName");
        obj.put("MONTH", "month");
        obj.put("NUMBER", "number");
        return obj;
    }
}